<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/18
 * Time: 11:45
 */

namespace Kinfy\View;

use Kinfy\Config;

class View
{

    public static function show($tpl, $data = [])
    {
        //路径硬编码
        //$tpldir = __DIR__ . '/../../../App/View/' . Config::get('theme') . '/';



        $tpldir = Config::get('view.tpldir');
        $theme = Config::get('view.theme');

        $tpl = $tpldir . '/'.$theme.'/'.$tpl . '.tpl.php';
        include($tpl);
    }

}



